package com.onlineclass.teacherserver.service.impl;

import com.onlineclass.teacherserver.constant.Restult;
import com.onlineclass.teacherserver.mapper.VideoMapper;
import com.onlineclass.teacherserver.service.IVideoService;
import com.onlineclassbackstage.beans.ResultObject;
import com.onlineclassbackstage.beans.Video;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VideoService implements IVideoService {

    @Autowired
    VideoMapper mapper;

    @Override
    public ResultObject insertVideo(Video video) {
        if (mapper.insertVideo(video) == Restult.getRight()){
            return new ResultObject(1,"right","成功上传");
        }else {
            return new ResultObject(0,"上传错误","成功上传");
        }
    }
}
